﻿using Taype.Trading.BTC.MtGoxAPIClient.JSONObjects;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using Taype.Trading.BTC.MtGoxAPIClient;

namespace MtGoxAPIClient_test
{
    
    
    /// <summary>
    ///This is a test class for MtGoxMultiCurrencyTickerItemDetailTest and is intended
    ///to contain all MtGoxMultiCurrencyTickerItemDetailTest Unit Tests
    ///</summary>
    [TestClass()]
    public class MtGoxMultiCurrencyTickerItemDetailTest
    {


        private TestContext testContextInstance;

        /// <summary>
        ///Gets or sets the test context which provides
        ///information about and functionality for the current test run.
        ///</summary>
        public TestContext TestContext
        {
            get
            {
                return testContextInstance;
            }
            set
            {
                testContextInstance = value;
            }
        }

        #region Additional test attributes
        // 
        //You can use the following additional attributes as you write your tests:
        //
        //Use ClassInitialize to run code before running the first test in the class
        //[ClassInitialize()]
        //public static void MyClassInitialize(TestContext testContext)
        //{
        //}
        //
        //Use ClassCleanup to run code after all tests in a class have run
        //[ClassCleanup()]
        //public static void MyClassCleanup()
        //{
        //}
        //
        //Use TestInitialize to run code before running each test
        //[TestInitialize()]
        //public void MyTestInitialize()
        //{
        //}
        //
        //Use TestCleanup to run code after each test has run
        //[TestCleanup()]
        //public void MyTestCleanup()
        //{
        //}
        //
        #endregion


        /// <summary>
        ///A test for MtGoxMultiCurrencyTickerItemDetail Constructor
        ///</summary>
        [TestMethod()]
        public void MtGoxMultiCurrencyTickerItemDetailConstructorTest()
        {
            double value = 0.0;
            long value_int = 0;
            string display = string.Empty;
            MtGoxCurrencySymbol currency = MtGoxCurrencySymbol.USD;
            MtGoxMultiCurrencyTickerItemDetail target = new MtGoxMultiCurrencyTickerItemDetail(value, value_int, display, currency);
            Assert.AreEqual(target.value, 0.0);
            Assert.AreEqual(target.value_int, 0);
            Assert.AreEqual(target.display, string.Empty);
            Assert.AreEqual(target.currency, MtGoxCurrencySymbol.USD);
        }

        /// <summary>
        ///A test for MtGoxMultiCurrencyTickerItemDetail Constructor
        ///</summary>
        [TestMethod()]
        public void MtGoxMultiCurrencyTickerItemDetailConstructorTest1()
        {
            MtGoxMultiCurrencyTickerItemDetail target = new MtGoxMultiCurrencyTickerItemDetail();
            Assert.IsNotNull(target);
        }

        /// <summary>
        ///A test for getObjects
        ///</summary>
        [TestMethod()]
        public void getObjectsTest()
        {
            string jsonDataStr = "{\"value\":\"5.70653\",\"value_int\":\"570653\",\"display\":\"$5.70653\",\"currency\":\"USD\"}";
            MtGoxMultiCurrencyTickerItemDetail expected = new MtGoxMultiCurrencyTickerItemDetail(5.70653, 570653, "$5.70653", MtGoxCurrencySymbol.USD);
            MtGoxMultiCurrencyTickerItemDetail actual;
            actual = MtGoxMultiCurrencyTickerItemDetail.getObjects(jsonDataStr);
            Assert.AreEqual(expected.currency, actual.currency);
            Assert.AreEqual(expected.display, actual.display);
            Assert.AreEqual(expected.value, actual.value);
            Assert.AreEqual(expected.value_int, actual.value_int);
        }
    }
}
